import i18n from '@/common/lang'

export const columns = [
  {
    label: i18n.t('resourceAdmin.datasource.name'),
    width: 160,
    prop: 'name',
    fixed: true
  },
  {
    label: i18n.t('resourceAdmin.datasource.dsName'),
    prop: 'dsName'
  },
  {
    label: i18n.t('resourceAdmin.datasource.driverClassName'),
    prop: 'driverClassName'
  },
  {
    label: i18n.t('resourceAdmin.datasource.username'),
    prop: 'username'
  },
  {
    label: i18n.t('resourceAdmin.datasource.dsType'),
    prop: 'dsType'
  },
  {
    label: i18n.t('resourceAdmin.datasource.state'),
    prop: 'state'
  }
]

export const actions = [
  {
    key: 'edit',
    text: i18n.t('common.edit'),
    permissions: 'datasource:setting:update'
  },
  {
    key: 'delete',
    text: i18n.t('common.delete'),
    permissions: 'datasource:setting:delete'
  },
  {
    key: 'resetPassword',
    text: i18n.t('resourceAdmin.datasource.resetPwd'),
    permissions: 'datasource:setting:resetPassword'
  }
]
